import Request from '../utils/http.js';

export default {
	//获取需求列表数据
	getDemanList: function(params) {
		return Request.httpRequest({
			url: '/api/service/demandList',
			method: 'POST',
			params: params
		});
	},
	
	//获取需求详情
	getDemandDetail: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/get_demand_id',
			method: 'POST',
			params: params
		});
	},
	
	//发布任务需求
	addDemand: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/release_task',
			method: 'POST',
			params: params
		});
	},
	
	//报名参与需求
	setDemand: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/submit_demand',
			method: 'POST',
			params: params
		});
	},
	
	//报名参与需求
	hireService: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/hire_service',
			method: 'POST',
			params: params
		});
	},
	
	//我的需求 
	getMyDemand: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/mydemandorder',
			method: 'POST',
			params: params
		});
	},
	
	//关闭需求
	closeDemand: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/close_demand',
			method: 'POST',
			params: params
		});
	},
	
	//删除需求
	delDemand: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/del_demand',
			method: 'POST',
			params: params
		});
	}
}